import Login from './components/Login.vue'
import NotFound from './components/404.vue'
import Home from './components/Home.vue'
import Main from './components/Main.vue'
import Zhu from './components/test/Zhu.vue'
import Food from './components/luolujin/Food.vue'
import constitution from './components/luolujin/constitution.vue'
import bespeakList from './components/tangyingmeng/bespeakList.vue'
import Menu from './components/denghao/Menu.vue'
import Rubric from './components/denghao/Rubric.vue'
import Question from './components/denghao/Question.vue'
import Record from './components/denghao/Record.vue'
import Count from './components/denghao/Count.vue'
import WorkCount from './components/denghao/WorkCount.vue'
import User from './components/denghao/User.vue'
import Upload from './components/denghao/Upload.vue'
import Specialist from './components/denghao/Specialist.vue'
import Consult from './components/denghao/Consult.vue'
import foodPlan from './components/luolujin/foodPlan.vue'
import keep from './components/luolujin/keep.vue'
import healthy from './components/luolujin/healthy.vue'
import bespeakSetting from './components/tangyingmeng/BespeakSetting.vue'
import disease from './components/luolujin/disease.vue'
import keepPlan from './components/luolujin/keepPlan.vue'
import plan from './components/luolujin/plan.vue'
import propose from './components/luolujin/propose.vue'
import bespeakProject from './components/tangyingmeng/bespeakProject.vue'
import setMeal from './components/tangyingmeng/setMeal.vue'
import personType from './components/tangyingmeng/personType.vue'
import quota from './components/tangyingmeng/quota.vue'
import template from './components/tangyingmeng/template.vue'
import diary from './components/tangyingmeng/diary.vue'
import mind from './components/luolujin/mind.vue'
import scheme from './components/tangyingmeng/scheme.vue'
import risk from './components/luolujin/risk.vue'
import work from './components/tangyingmeng/work.vue'

let routes = [
  {
    path: '/login',
    component: Login,
    name: '登录'
  },
  {
    path: '/404',
    component: NotFound,
    name: '404'
  },
  {
    path: '/home',
    component: Home,
    name: '主页',
    children: [
      {
        path: 'welcome',
        name: '首页',
        components: {'left': Zhu}
      },
      { path: 'member',
        components: {'left': Main},
        children: [
          { path: 'record', components: {'right': Record}, name: '会员档案' },
          { path: 'count', components: {'right': Count}, name: '会员统计' },
          { path: 'upload', components: {'right': Upload}, name: '体检上传' }
        ],
        name: '会员管理'
      },
      { path: 'bespeak',
        components: {'left': Main},
        name: '预约管理',
        children: [
          { path: 'bespeakSetting', components: {'right': bespeakSetting}, name: '预约设置' },
          { path: 'bespeakList', components: {'right': bespeakList}, name: '预约列表' },
          { path: 'bespeakProject', components: {'right': bespeakProject}, name: '检查项目管理' },
          { path: 'setMeal', components: {'right': setMeal}, name: '套餐管理' }
        ]
      },
      { path: 'health',
        components: {'left': Main},
        name: '健康评估',
        children: [
          { path: 'constitution', components: {'right': constitution}, name: '体质测评' },
          { path: 'mind', components: {'right': mind}, name: '心理测评' },
          { path: 'risk', components: {'right': risk}, name: '风险测评' }
        ]
      },
      { path: 'intervention',
        components: {'left': Main},
        name: '健康干预',
        children: [
          { path: 'personType', components: {'right': personType}, name: '人群分类' },
          { path: 'scheme', components: {'right': scheme}, name: '干预方案' },
          { path: 'work', components: {'right': work}, name: '干预工作台' },
          { path: 'diary', components: {'right': diary}, name: '随访日记' },
          { path: 'quota', components: {'right': quota}, name: '指标库管理' },
          { path: 'template', components: {'right': template}, name: '方案模板管理' }
        ]
      },
      { path: 'knowledge',
        components: {'left': Main},
        name: '知识库',
        children: [
          { path: 'propose', components: {'right': propose}, name: '评估建议' },
          { path: 'plan', components: {'right': plan}, name: '健康方案' },
          { path: 'healthy', components: {'right': healthy}, name: '健康库' },
          { path: 'keepPlan', components: {'right': keepPlan}, name: '运动方案' },
          { path: 'keep', components: {'right': keep}, name: '运动项目库' },
          { path: 'foodPlan', components: {'right': foodPlan}, name: '膳食方案' },
          { path: 'food', components: {'right': Food}, name: '膳食库' },
          { path: 'disease', components: {'right': disease}, name: '疾病库' }
        ]
      },
      { path: 'count',
        components: {'left': Main},
        name: '统计分析',
        children: [
          { path: 'workCount', components: {'right': WorkCount}, name: '工作量统计' }
        ]
      },
      { path: 'system',
        components: {'left': Main},
        name: '系统设置',
        children: [
          { path: 'menu', components: {'right': Menu}, name: '菜单管理' },
          { path: 'user', components: {'right': User}, name: '用户管理' },
          { path: 'rubric', components: {'right': Rubric}, name: '题库管理' },
          { path: 'question', components: {'right': Question}, name: '问卷管理' }
        ]
      },
      { path: 'proscenium',
        components: {'left': Main},
        name: '其它功能',
        children: [
          { path: 'specialist', components: {'right': Specialist}, name: '专家咨询展示设置' },
          { path: 'consult', components: {'right': Consult}, name: '咨询消息列表' }
        ]
      }
    ]
  },
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '*',
    redirect: { path: '/404' }
  }
]

export default routes
